}
+/* Upon block read completion, issue a dummy machphys update for the
+pages in the buffer, just in case we're being migrated. */
+
+static void blkif_read_completion(struct request *req)
+{
+ struct bio *bio;
+ struct bio_vec *bvec;
+ int idx;
+ unsigned long mfn, pfn
+
+ rq_for_each_bio(bio, req) {
+ bio_for_each_segment(bvec, bio, idx) {
+ mfn = page_to_phys(bvec->bv_page)>>PAGE_SHIFT;
+ pfn = machine_to_phys_mapping[mfn];
+ queue_machphys_update(mfn, pfn);
+ }
+ }
+}
+
+
static irqreturn_t blkif_int(int irq, void *dev_id, struct pt_regs *ptregs)
{
struct request *req;
BUG();
end_that_request_last(req);
+
+ if( bret->operation == BLKIF_OP_READ )
+ blkif_read_completion( req );
break;
case BLKIF_OP_PROBE:
memcpy(&blkif_control_rsp, bret, sizeof(*bret));
if ( xc_domain_setinitialmem(xc_handle, dom,
nr_pfns * (PAGE_SIZE / 1024)) )
{
- xcio_error(ioctxt, "Could not set domain initial memory");
+ xcio_error(ioctxt, "Could not set domain %d initial memory. pfns=%d, %dKB",
+ dom, nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
goto out;
}
pfn_batch[batch] = n;
pfn_type[batch] = live_pfn_to_mfn_table[n];
- if( pfn_type[batch] == 0x80000004 ){
+ if( pfn_type[batch] == 0x80000001 ){
/* not currently in pusedo-physical map -- set bit
in to_fix that we must send this page in last_iter
unless its sent sooner anyhow */